Integrating with Xano

Help Center

Xano homepage

Xano lets you integrate with DocuGenerate to add document creation to your backend. Our snippet provides custom functions for handling templates and generating documents, helping you automate workflows and create high-quality PDFs effortlessly.

Summary

1. Install the Snippet
2. Generate Document
3. List Documents
4. Get Document
5. Update Document
6. Delete Document
7. Create Template
8. List Templates
9. Get Template
10. Update Template
11. Delete Template

1. Install the Snippet

To get started, add the DocuGenerate snippet to your Xano account and configure it with your API key. We use Xano environment variables to securely store your API key.

Go to your DocuGenerate account settings to obtain your API Key and enter it the Xano workspace settings as the value for the docugenerate_api_key environment variable:

Configure the DocuGenerate API Key in Xano

2. Generate Document

This function creates a document from a specified template and dataset. Define the document’s name, filename, and format, and provide the data to populate fields in the template. The following inputs are customizable:

  • template_id (Template ID): Required to specify the template to use.
  • name (Text): Optional; assign a name to the generated document.
  • output_name (Text): Optional; define a custom filename for the output document.
  • output_format (Text): Optional; specify the output format (e.g., .pdf, .docx, .doc, .odt, .txt, .html, .png).
  • data (JSON): Required; data to populate fields in the template.

Generate document function

3. List Documents

Fetches a list of documents generated from a specific template, allowing you to track or display previously generated documents related to a template. It requires the following input:

  • template_id (Template ID): Required to specify the template for which to list documents.

List documents function

4. Get Document

This function retrieves metadata for a specific document, such as its filename, format, and document URI. The following input is required :

  • id (Document ID): Required to specify which document to retrieve.

Get document function

5. Update Document

Use this function to modify details of an existing document, such as updating the document’s name. The following inputs are expected:

  • id (Document ID): Required to specify the document to update.
  • name (Text): Optional; change the document’s name.

Update document function

6. Delete Document

This function deletes a document from your DocuGenerate account. It requires the following input:

  • id (Document ID): Required to specify the document to delete.

Delete document function

7. Create Template

Upload a new file as a template to your DocuGenerate account. This action also allows you to specify an optional name for the template. Once uploaded, this template can be used to generate documents based on user data. The following inputs are expected:

  • file (File upload): Required; upload the .docx file to use as a template.
  • name (Text): Optional; specify a name for the new template.

Create template function

8. List Templates

Use this call to retrieve a list of all templates stored in your DocuGenerate account, including basic details such as template names and IDs.

List templates function

9. Get Template

This call retrieves detailed information for a specific template, using the template’s unique ID. You can access attributes like the template’s name, tags, and format. This call requires the following input:

  • id (Template ID): Required to specify which template to retrieve.

Get template function

10. Update Template

Modify an existing template’s file or update its name. The following inputs are required:

  • id (Template ID): Required to specify the template to update.
  • file (File upload): Optional; upload a new file if updating the template content.
  • name (Text): Optional; update the template name.

Update template function

11. Delete Template

Remove a template from your DocuGenerate account. It requires the following input:

  • id (Template ID): Required to specify the template to delete.

Delete template function